Scripting > CxEditors > CxFacEditor Object > CxFacEditor Methods

CxFacEditor Methods

The CxFacEditor object contains the following methods:

Configure

The Configure method launches a Facility Attribute Definitions dialog box, which is used to configure facility attributes.

Syntax

Configure() As Integer

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  2 Close button was pressed.

Example

The following example launches a Facility Attribute Definitions dialog box.

Sub

Dim iRet

iRet= FacEditor.Configure

MsgBox iRet

End Sub

Back to top

Connect

The Connect method connects to an FAC.

Syntax

Connect(DomainSiteService As String)

Parameters

Parameter Required Description

DomainSiteService

Yes

The [Domain]Site.Service to which to connect.  A domain is optional. The service must be a valid FAC.

Example

The following example creates and connects the CxFacEditor object.

Sub

Dim FacEditor

Set FacEditor = CreateObject("CxEditors.CxFacEditor")

FacEditor.Connect("[5410]CYGDEMO.FAC")

End Sub

Back to top

Copy

The Copy method launches a New Facility property sheet initialized with the information in the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.

Syntax

Copy(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to copy.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a New Facility property sheet for record "0000000319."

Sub

Dim iRet

iRet= FacEditor.Copy("0000000319")

MsgBox iRet

End Sub

Back to top

Delete

The Delete method launches a Delete Facility property sheet initialized with the information in the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.

Syntax

Delete(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to delete.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a Delete Facility property sheet for record "0000108387."

Sub

Dim iRet

iRet= FacEditor.Delete("0000108387")

MsgBox iRet

End Sub

Back to top

Disconnect

The Disconnect method disconnects from the connected FAC service.

Syntax

Disconnect()

Example

The following example disconnects the FacEditor object.

Sub

FacEditor.Disconnect

End Sub

Back to top

Edit

The Edit method launches a property sheet for the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.

Syntax

Edit(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to edit.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a property sheet for record "0000000319."

Sub

Dim iRet

iRet= FacEditor.Edit("0000000319")

MsgBox iRet

End Sub

Back to top

New

The New method launches a New Facility property sheet.

Syntax

New() As Integer

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a New Facility property sheet.

Sub

Dim iRet

iRet= FacEditor.New

MsgBox iRet

End Sub

Back to top

View

The View method launches a property sheet for the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.

Syntax

View(Key As String, EditEnabled As Boolean) As Integer

Parameters

Parameter Required Description

Key

Yes

The database queue key of the record to view.

EditEnabled

Yes

Set to true to enable editing of the property sheet.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  2 Cancel button was pressed.

Example

The following example launches a property sheet for record "0000000319."

Sub

Dim iRet

iRet= FacEditor.View("0000000319", True)

MsgBox iRet

End Sub

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.